import { createRouter, createWebHistory } from 'vue-router';
import Home from '@/views/Home/index.vue';
import Animation from '@/views/Animation/index.vue';
import Audio from '@/views/Audio/index.vue';

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: '/',
      redirect: '/audio',
    },
    {
      path: '/home',
      name: 'Home',
      component: Home,
    },
    {
      path: '/animation',
      name: 'Animation',
      component: Animation,
    },
    {
      path: '/audio',
      name: 'Audio',
      component: Audio,
    },
    {
      path: '/bilibiliBarrage',
      name: 'BilibiliBarrage',
      component: () => import('@/views/Audio/BilibiliBarrage.vue'),
    },
  ],
});

export default router;
